package com.zmn.mcc.persistence.interfaces.organize;

import com.zmn.common.dto.StatusDTO;
import com.zmn.mcc.model.entity.organize.McOrganize;
import com.zmn.mcc.model.entity.organize.McOrganizeQuery;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 10:48
 */
public interface OrganizeDao {

    McOrganize findByKey(Integer orgId);

    McOrganize findByQuery(McOrganizeQuery query);

    List<McOrganize> listPageByQuery(McOrganizeQuery query);

    List<McOrganize> listAboveByLevel(McOrganizeQuery query);

    List<McOrganize> listByQuery(McOrganizeQuery query);

    Integer countByQuery(McOrganizeQuery query);


    Integer updateByKey(McOrganize organize);

    Integer updateStatus(McOrganize organize);

    Integer updateStatusBatch(StatusDTO dto);

    Integer updateSort(McOrganize organize);


    Integer insert(McOrganize organize);


    Integer deleteByKey(Integer orgId);

    List<McOrganize> listValidOrgs();

    void updateBsOrg(McOrganize organize);
}
